﻿using CPFrameWork.Global;
using CPFrameWork.Utility;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace CPFrameWork.Plat.CarMonitor
{
    public class CarMonitorController : CPMVCBaseController
    {
        //车辆实时监控
        public IActionResult CarRealTimeMonitor()
        {
            base.SetGlobalViewBag();
            ViewBag.currentDataUrl = "<script> var currentDataUrl = \"" + CPUtils.Configuration.GetSection("AppSettings")["CurrentDataUrl"] + "\";</script>";
            ViewBag.historyDataUrl = "<script> var historyDataUrl = \"" + CPUtils.Configuration.GetSection("AppSettings")["HistoryDataUrl"] + "\";</script>";
            return View();
        }
        //车辆历史路径
        public IActionResult CarHistoryPath()
        {
            base.SetGlobalViewBag();
            ViewBag.currentDataUrl = "<script> var currentDataUrl = \"" + CPUtils.Configuration.GetSection("AppSettings")["CurrentDataUrl"] + "\";</script>" ;
            ViewBag.historyDataUrl = "<script> var historyDataUrl = \"" + CPUtils.Configuration.GetSection("AppSettings")["HistoryDataUrl"] + "\";</script>";
            return View();
        }
        //任务-车辆追溯
        public IActionResult CarHistoryMonitor()
        {
            base.SetGlobalViewBag();
            ViewBag.currentDataUrl = "<script> var currentDataUrl = \"" + CPUtils.Configuration.GetSection("AppSettings")["CurrentDataUrl"] + "\";</script>";
            ViewBag.historyDataUrl = "<script> var historyDataUrl = \"" + CPUtils.Configuration.GetSection("AppSettings")["HistoryDataUrl"] + "\";</script>";
            return View();
        }
    }
}
